package com.xishu.util;

import com.aliyun.oss.OSSClient;
import com.xishu.config.Config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OSSClientFactory {
    private static Logger logger = LoggerFactory.getLogger(OSSClientFactory.class);

    private static OSSClientFactory ourInstance = new OSSClientFactory();

    public static OSSClientFactory getInstance() {
        return ourInstance;
    }

    private OSSClientFactory() {
    }

    /**
     * OSS外部客户端
     *
     * @return
     */
    public OSSClient createClient() {
        Config config = Config.getInstance();
        return new OSSClient(config.getOSSEndPoint(), config.getOssAk(), config.getOssSk());
    }

}
